<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link href="/skin/main/bl_ococ.css" rel="stylesheet" type="text/css">
<?php $this->display('inc_skin.php', 0 , '会员中心－订单记录'); ?>

</head> 
<?php 
   $daili=$this->getRows("select uid,parentId,username,nickname,name,type from {$this->prename}members where parentId=".$this->user['uid']." and type=1");
   $huiyuan=$this->getRows("select uid,parentId,username,nickname,name,type from {$this->prename}members where parentId=".$this->user['uid']." and type=0");
   $uids = $_GET['uids'];
   $params = "uids=".$_GET['uids'];
   $sqls = "select * from {$this->prename}orderssc where uid=".$uids." order by id desc";
   // $data=$this->getPage($sqls, $this->page, $this->pageSize);
   $data = $this->getPage($sqls,$this->page, $this->pageSize);
   foreach ($data['data'] as $key => $value) {
   		$data['data'][$key]['kjhaoma'] = $this->getRow("select * from {$this->prename}datassc where qishu=".$value['qishu']."");
   }
	// $res = "select * from {$this->prename}datassc where status =1 and time between '$start' and '$end' order by id desc";
 //  	    $res= $this->getPage($res, $this->page, $this->pageSize);
	
   $modeName=array('2.00'=>'元', '0.20'=>'角', '0.02'=>'分');
?>

<body>
<div id="mainbody"> 
<div id="page-header">
<div class="fm userInfo"> <div class="bodytop">
    <div id="money">
    昵称：<em><?=$this->user['nickname']?></em>
    余额：
    <strong>￥<?=$this->user['coin']?><a href="#" onclick="reloadMemberInfo()"><img src="/images/common/ref.png" alt="刷新余额"></a></strong>
    <a href="/index.php/cash/recharge">充值</a>
    <a href="/index.php/cash/toCash">提款</a>
    <a href="http://www.chinacqcp.com/kf.html target=" _blank"="">客服</a>
    <a href="/index.php/user/logout">退出</a>
  </div>
</div></div>
</div>
<style type="text/css">
  .pagemain input.btnss {
    background-color: #c32828;
    line-height: 20px;
    height: 30px;
    width: 80px;
    padding: 5px;
    padding-left: 20px;
    padding-right: 20px;
    border: 0;
    margin: 10px 5px;
    color: #fff;
    border-radius: 5px;
    background-image: url(/images/common/light.png);
    background-position: left top;
    background-repeat: repeat-x;
    border: 1px #dc4545 solid;
    cursor: pointer;
    margin-left: 20%;
}
.mmss{
  border: 1px solid #CCCCCC;
    border-radius: 5px;
    height: 24px;
    margin-right: 10px;
    width: 100px;
    padding-left: 5px;
    vertical-align: middle;
}
</style>

<div class="pagetop"></div>
<div class="pagemain">

<div>
<table width="100%" class='table_b'>
	<thead>
		<tr class="table_b_th">
			<td>用户名</td>
			<td>期号</td>
			<td>玩法</td>
			<td>日期</td>
			<td>奖金(元)</td>
			<td>开奖号码</td>
			<td>状态</td>
		</tr>
	</thead>
	<tbody class="table_b_tr">
	<?php if($data['data']){ 
	foreach($data['data'] as $var){ ?>
		<tr>
			<td><?=$var['username']?></td>
			<td><?=$var['qishu']?></td>
			<td>
				<?php
					if($var['type']==1){
						echo '<font color="#009900">大小</font>';
					}elseif($var['type']==2){
						echo '<font color="#009900">单双</font>';
					}elseif($var['type']==3){
						echo '<font color="#009900">龙虎</font>';
					}elseif($var['type']==4){
						echo '<font color="#009900">直选</font>';
					}
				?>
			</td>
			<td><?=date('Y-m-d',$var['ordertime'])?></td>
			<td><?=$var['winmoney']?></td>
			<td><?=$var['kjhaoma']['ball1'].$var['kjhaoma']['ball2'].$var['kjhaoma']['ball3'].$var['kjhaoma']['ball4'].$var['kjhaoma']['ball5']?></td>
			<td>
			<?php
				if($var['kai']==1){
					echo '<font color="#009900">已中奖</font>';
				}elseif($var['kai']==2){
					echo '<font color="#999999">未中奖</font>';
				}else{
					echo '未开奖';
				}
			?>
			</td>
            
		</tr>
	<?php } }else{ ?>
    <tr><td colspan="12">暂无投注信息</td></tr>
    <?php } ?>
	</tbody>
</table>
<?php 
	$this->display('inc_page.php',0,$data['total'],$this->pageSize, "/index.php/safe/orderlists-{page}/?$params");
?>
</div>


</div>
<div class="pagebottom"></div>
</div>

</body>
</html>
<script type="text/javascript">
  $(function(){
    $('#dailis').show();
    $('#huiyuans').hide();
  })
  //代理
  function daili() {
    $('#dailis').show();
    $('#huiyuans').hide();
    $('.btnss').eq(0).css({'background':'#c32828','border':'1px solid #c32828'});//代理
    $('.btnss').eq(1).css({'background':'#CCCCCC','border':'1px solid #CCCCCC'});//会员
  }
  //会员
  function huiyuan(){
    $('#dailis').hide();
    $('#huiyuans').show();
    $('.btnss').eq(1).css({'background':'#c32828','border':'1px solid #c32828'});//会员
    $('.btnss').eq(0).css({'background':'#CCCCCC','border':'1px solid #CCCCCC'});//代理
  }

  
</script>
  
   
